<template>
  <div>
    <van-divider />

    <div>
      <van-row>
        <van-col span="8"><router-link to="/index"><van-icon name="arrow-left" />返回</router-link></van-col>
        <van-col span="8">景点预览</van-col>
        <van-col span="8"></van-col>
      </van-row>
    </div>

    <van-divider />
    <div>
      <div>
        <router-link to='/attdto'>
          <van-button class="tg1" type="primary" color="lightskyblue"><van-icon name="arrow" />优惠团购</van-button>
        </router-link>
      </div>
    </div>
    <!--    <van-divider />-->
<!--    <div>-->
<!--      <van-divider />-->
<!--      <form action="/">-->
<!--        <van-search-->
<!--            v-model="value"-->
<!--            shape="round"-->
<!--            background="lightskyblue"-->
<!--            show-action-->
<!--            placeholder="请输入城市"-->
<!--            @search="onSearch"-->
<!--            @cancel="onCancel"-->
<!--        />-->
<!--        &lt;!&ndash;        <button type="submit" @click="ss">搜索</button>&ndash;&gt;-->
<!--      </form>-->

<!--    </div>-->

        <van-divider />
    <div>
      <router-link to='/search'>
        <van-button type="primary" class="df" color="lightskyblue">搜索目的地</van-button>
      </router-link>
    </div>
    <van-divider />
    <div>
      <van-button type="primary" color="lightskyblue" plain="true" to="popular">人气最高</van-button>

      <van-button type="primary" color="lightskyblue" plain="true" to="tile">预览</van-button>
      <van-button type="primary" color="lightskyblue" to="winnow">景点精选</van-button>
    </div>


    <div>
      <div>
        <van-tabs v-model:active="active">

          <div class="dv1" v-for="a in win">
            <van-row>
              <van-col :span="10">
                <img class="img1" :src="a.imgurl" >
              </van-col>
              <van-col :span="13">
                <div class="dv2">{{ a.name }}
                  <!--                        <img class="img1" :src="a.imgurl" >{{ a.city }}-->

                </div>
                <div class="dv2">
                </div>
              </van-col>
            </van-row>
          </div>
        </van-tabs>
      </div>

      <!--   1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!111111   -->

    </div>



  </div>

</template>

<script>
import { ref } from 'vue';
import { Toast } from 'vant';
export default {
  name: "WinnowView",

  data() {
    return {
      active: 0,
      tile: [
        {
          id: 1,
          city: "",
          // name:"",
          imgurl: ""
        }
      ],
      til: [
        {
          id: "1",
          chineseName: "",
          // name:"",
          imgUrl: ""
        }
      ],
      win: [
        {
          id: "1",
          name: "",
          imgurl: ""
        }
      ],

      type: 1,
    }
  },


  setup1() {
    const activeName = ref('a');
    return {activeName};
  },


  mounted() {
    this.axios.get("/api/tile/sort.do").then((r) => {

      if (r.data.code == 200) {
        this.win = r.data.data;
        this.win.imgurl = r.data.data.imgurl;
        console.log(this.win.imgurl)

      }
    })
  },
  methods: {
    //返回
    back() {
      history.back();
    },
  }
}

</script>

<style scoped>
.dv1{
  width: 100%;
  margin-left: 5%;
  margin-bottom: 50px;
}
.dv2{
  margin: 5px;
  font-size: 30px;
  color: ghostwhite;
}

.img1{
  width: 200%;
  height: 100%;
  ext-align: center;
  border-radius: 6px;

}
.tg1{
  width: 350px;
  height: 40px;
  font-size: 19px;
  color: beige;
}
.df{
  width: 350px;
  height: 40px;
  font-size: 19px;
  color: beige;
}

</style>